package com.my.aop;

import org.springframework.stereotype.Component;

@Component
public class Calc implements ICalc {

    @Override
    public int add(int a, int b) {
        return a + b;
    }

    @Override
    public int multipy(int a, int b) {
        return a * b;
    }

    /**
     * @param role 演示访问的角色权限
     */
    @Override
    @CheckAuth("admin")
    public int divide(String role, int a, int b) {
        return a / b;
    }

}
